#!/bin/ksh

function usage {
  print "msg $2"
  print "Usage $1 [path/to/file]"
  exit 1
}


#main routine goes here ----------
if [[ $# -eq 1 ]]; then
  listOfDIRObjs=$1
else
  usage $0 "parameter error"
fi


for i in $(cat $listOfDIRObjs); do
  ls $i > /dev/null 2>&1
  if [[ $? -eq 0 ]];then
    print "$i ok"
  else
    print "$i bad"
  fi
done

